<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/09/28
  Time: 16:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="js/jquery.min.js"></script>
</head>
<body>
<form class="layui-form" action="professorAdd" method="post" enctype="multipart/form-data">
    <div class="layui-form-item">
        <label for="professorName" class="layui-form-label"> <span
                class="x-red">*</span> 专家姓名
        </label>
        <div class="layui-input-inline">
            <input type="text" id="professorName" name="professorName"
                   lay-verify="professorName" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label for="gender" class="layui-form-label"> <span
                class="x-red">*</span>性别
        </label>
        <div >
            <input type="radio" name="gender" id="gender" value="男" checked="" />男
            <input type="radio" name="gender" id="gender" value="女" />女
        </div>
    </div>
    <div class="layui-form-item">
        <label for="birthday" class="layui-form-label"> <span
                class="x-red">*</span>出生日期
        </label>
        <div class="layui-input-inline">
            <input type="date" id="birthday" name="birthday" required=""
                   lay-verify="birthday" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label for="identityNumber" class="layui-form-label"> <span
                class="x-red"></span>身份证号
        </label>
        <div class="layui-input-inline">
            <input type="text" id="identityNumber" name="identityNumber"
                   lay-verify="identityNumber" autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label for="workStatus" class="layui-form-label"> <span
                class="x-red"></span>工作状况
        </label>
        <div class="layui-input-inline">
            <select name="workStatus" id="workStatus" required="">
                <option value="在职">在职</option>
                <option value="退休">退休</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label for="institution" class="layui-form-label"> <span
                class="x-red">*</span>毕业院校
        </label>
        <div class="layui-input-inline">
            <input type="text" id="institution" name="institution"
                   lay-verify="institution" required="" autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label for="education" class="layui-form-label"> <span
                class="x-red">*</span>学历
        </label>
        <div class="layui-input-inline">
            <select id="education" name="education" lay-verify="education"
                    class="layui-input" required="">
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label for="major" class="layui-form-label"> <span
                class="x-red">*</span>专业
        </label>
        <div class="layui-input-inline">
            <input type="text" id="major" name="major" lay-verify="major"
                   autocomplete="off" class="layui-input" required="">
        </div>
    </div>
    <div class="layui-form-item">
        <label for="employCompany" class="layui-form-label"> <span
                class="x-red">*</span>工作单位
        </label>
        <div class="layui-input-inline">
            <input type="text" id="employCompany" name="employCompany"
                   lay-verify="employCompany" autocomplete="off" class="layui-input"
                   required="">
        </div>
    </div>
    <div class="layui-form-item">
        <label for="administrative" class="layui-form-label"> <span
                class="x-red">*</span>行政职务
        </label>
        <div class="layui-input-inline">
            <select id="administrative" name="administrative"
                    lay-verify="administrative" class="layui-input" required="">
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label for="technicalPost" class="layui-form-label"> <span
                class="x-red">*</span>技术职称
        </label>
        <div class="layui-input-inline">
            <select id="technicalPost" name="technicalPost"
                    lay-verify="technicalPost" class="layui-input" required="">
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label for="phone" class="layui-form-label"> <span
                class="x-red"></span>固定电话
        </label>
        <div class="layui-input-inline">
            <input type="text" id="phone" name="phone"
                   lay-verify="fixphone" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label for="mobliePhone" class="layui-form-label"> <span
                class="x-red"></span>手机号
        </label>
        <div class="layui-input-inline">
            <input type="text" id="mobliePhone" name="mobliePhone"
                   lay-verify="mobliePhone" autocomplete="off" class="layui-input"
                   required="">
        </div>
    </div>
    <div class="layui-form-item">
        <label for="address" class="layui-form-label"> <span
                class="x-red"></span>地址
        </label>
        <div class="layui-input-inline">
            <input type="text" id="address" name="address"
                   lay-verify="address" autocomplete="off" class="layui-input"
                   required="">
        </div>
    </div>
    <div class="layui-form-item">
        <label for="projectCategory" class="layui-form-label"> <span
                class="x-red"></span>评审项目类型
        </label>
        <div class="layui-input-inline">
            <input type="text" id="projectCategory" name="projectCategory"
                   lay-verify="projectCategory" autocomplete="off"
                   class="layui-input" required="">
        </div>
    </div>
    <div class="layui-form-item">
        <label for="workDate" class="layui-form-label"> <span
                class="x-red"></span>专家工作的年限
        </label>
        <div class="layui-input-inline">
            <input type="number" id="workDate" name="workDate"
                   lay-verify="workDate" autocomplete="off" class="layui-input" value="0"  min="0" step="1" required="">
        </div>
    </div>
    <div class="layui-form-item">
        <label for="lostNum" class="layui-form-label"> <span
                class="x-red"></span>专家连续未参加评标的次数
        </label>
        <div class="layui-input-inline">
            <input type="number" id="lostNum" name="lostNum"
                   lay-verify="lostNum" autocomplete="off" class="layui-input" value="0"  min="0" step="1" required="">
        </div>
    </div>
    <div class="layui-form-item">
        <label for="createBy" class="layui-form-label"> <span
                class="x-red"></span>创建者
        </label>
        <div class="layui-input-inline">
            <input type="text" id="createBy" name="createBy"
                   lay-verify="createBy" autocomplete="off"
                   class="layui-input" required="">
        </div>
    </div>
    <div class="layui-form-item">
        <label for="modifyBy" class="layui-form-label"> <span
                class="x-red"></span>修改人
        </label>
        <div class="layui-input-inline">
            <input type="text" id="modifyBy" name="modifyBy"
                   lay-verify="modifyBy" autocomplete="off"
                   class="layui-input" required="" placeholder="第一次创建时，修改者同为创建者">
        </div>
    </div>
    <div class="layui-form-item">
        <label for="idcard" class="layui-form-label"> <span
                class="x-red"></span>身份证照片
        </label>
        <div class="layui-input-inline">
            <input type="file" id="idcard" name="idcard"
                   lay-verify="unit" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"></label> <label
            class="layui-form-label"></label>
        <button class="layui-btn" lay-filter="add" lay-submit="">增加</button>
    </div>
</form>
<script>
    $(function(){
        var $role=$("#education");
        $.getJSON("Education/findAll",function(data){
            $.each(data,function(i,d){
                $role.append(new Option(d.educationname,d.id));
            });
        });
    });
</script>
<script>
    $(function(){
        var $role=$("#administrative");
        $.getJSON("Administrative/findAll",function(data){
            $.each(data,function(i,d){
                $role.append(new Option(d.administrative,d.id));
            });
        });
    });
</script>
<script>
    $(function(){
        var $role=$("#technicalPost");
        $.getJSON("Technicalpost/findAll",function(data){
            $.each(data,function(i,d){
                $role.append(new Option(d.technicalPost,d.id));
            });
        });
    });
</script>
</body>
</html>
